
<script type="text/javascript">

$(document).ready(function() {

	
	$( "#test" ).css({ height: '200px' });
	$("input").focus(function () {
		
		
		$( "#imgfool" ).css({ height: '50px' });
		
		
   });
	
	
	$( "#search_keywords" ).autocomplete({
		source: 
				function(request, resp) {
					$.getJSON("http://localhost:8983/solr/select/?q="+request.term+"&wt=json&json.wrf=?&indent=true", 
					function(result){
						var str=new Array();
						console.log(str);
						var Parent = document.getElementById('rs');
							str=result.response.docs[0].sf_text;
							console.log(str);
						for (var i = 1; i < result.response.docs.length; i++) {
							
							str=str.concat(result.response.docs[i].sf_text);
							
						}
						console.log(str);
						resp(str);
					}
					)
				}
	});
	
});


</script>




	
	
<div class="ui-widget" id="divwidg">
	<div id="divlogo"><img id="imgfool"  src="/images/logo4.png"></div>
	<div class="search">
		<form method="get" action="<?php echo url_for('@download_search') ?>"> 
            <input type="text" id="search_keywords" value="" name="q"/>
        <div id="envoi"><input type="submit" value="submit" /></div>
    	</form>
    </div>
    <div class="help">
        Entrer des mots clé( Titre, Categorie, Acteur, ......)
    </div>
</div>

<?php
if($results && isset($_GET['q'])){
if(count($results))
    echo "<div id='downloads'>".include_partial('download/list', array('filys' => $results))."</div> ";
    
else
    echo "No Result";
}

?>

